﻿//
// GNS_TopAndTickDivider.h
// MobileManageSys
//
// Created by mr.l on 16/1/15.
//
//

#ifndef __MobileManageSys__GNS_TopAndTickDivider__
#define __MobileManageSys__GNS_TopAndTickDivider__

#include "cocos2d.h"
#include "cocostudio/CocoStudio.h"
#include "ui/CocosGUI.h"
#include "GNS_Common.h"
#include "GNS_MakeLayer.h"
#include "GNS_CursorTextField.h"
#include "GNS_Handler.h"

USING_NS_CC;
using namespace cocostudio::timeline;
using namespace ui;
US_NS_CUSTOM_UI;

class GNS_TopAndTickDivider : public Layer
{
public:
    GNS_TopAndTickDivider();
    ~GNS_TopAndTickDivider();
    static GNS_TopAndTickDivider* createLayer();
    virtual bool init();
    CREATE_FUNC(GNS_TopAndTickDivider);
    void BtnCallBack(Ref *pSender , ui::Widget::TouchEventType type);
    void SetNodeName(std::string CsbName);
    void SetDivider(CMD_SC_GetSingleAgentInfoResult* pExList);
    void SetButtonState(int State);
    void SetNewReName(std::string NewReName);
private:
	//add by Jack
	bool checkInput();
	void OnUIAction(std::string Text, bool isUTF);

    Node * pGNS_TopAndTickDivider;
    GNS_MakeLayer* pMakeLayer;
    Button * StateButton;
    //GNS_CursorTextField * ReNameText;
	TextField * reNameText;
    int StateNum;//0为正常状态,1为封号状态
    std::string ReaName;
    Button * pModifyData;
    /**
     *  UI 文本获取
     */
    Text * IDtext;
    Text * Rename;
    Text * AccountedInfo;
    Text * Accounted;
    Text * Num;
    //TextField * ReNameText;
    Text * AccountedInfoText;
    Text * AccountedText;
    Text * numText;
    Text * stateText;
    Text * goldText;
    Text * TopText;
    Text * tickText;
    ImageView * InputBg;
    bool IsInput;

	CustomEditBox * _reNameText;
};

#endif /* defined(__MobileManageSys__GNS_TopAndTickDivider__) */